home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / internet / srobj / srobj.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-22  |  57.7 KB  |  1,632 lines

  1. VERSION 2.00
  2. Begin Form frmServerObject 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Save/Restore Server Object"
  6.    ClientHeight    =   5625
  7.    ClientLeft      =   2895
  8.    ClientTop       =   2730
  9.    ClientWidth     =   8055
  10.    Height          =   6030
  11.    Icon            =   SROBJ.FRX:0000
  12.    Left            =   2835
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   5625
  16.    ScaleWidth      =   8055
  17.    Top             =   2385
  18.    Width           =   8175
  19.    Begin Timer tmrDisplay 
  20.       Enabled         =   0   'False
  21.       Interval        =   1000
  22.       Left            =   60
  23.       Top             =   5820
  24.    End
  25.    Begin Frame zfraRestoreTo 
  26.       BackColor       =   &H00C0C0C0&
  27.       Caption         =   "Restore To AS/400 Library"
  28.       Height          =   915
  29.       Left            =   60
  30.       TabIndex        =   25
  31.       Top             =   4650
  32.       Width           =   4365
  33.       Begin CommandButton cmdRestore 
  34.          Caption         =   "&Restore"
  35.          FontBold        =   0   'False
  36.          FontItalic      =   0   'False
  37.          FontName        =   "MS Sans Serif"
  38.          FontSize        =   8.25
  39.          FontStrikethru  =   0   'False
  40.          FontUnderline   =   0   'False
  41.          Height          =   330
  42.          Left            =   2400
  43.          TabIndex        =   12
  44.          Top             =   480
  45.          Width           =   1785
  46.       End
  47.       Begin TextBox txtRestoreLibrary 
  48.          FontBold        =   0   'False
  49.          FontItalic      =   0   'False
  50.          FontName        =   "MS Sans Serif"
  51.          FontSize        =   8.25
  52.          FontStrikethru  =   0   'False
  53.          FontUnderline   =   0   'False
  54.          Height          =   285
  55.          Left            =   120
  56.          TabIndex        =   11
  57.          Top             =   480
  58.          Width           =   1935
  59.       End
  60.       Begin Label zlbl 
  61.          BackStyle       =   0  'Transparent
  62.          Caption         =   "Library"
  63.          FontBold        =   0   'False
  64.          FontItalic      =   0   'False
  65.          FontName        =   "MS Sans Serif"
  66.          FontSize        =   8.25
  67.          FontStrikethru  =   0   'False
  68.          FontUnderline   =   0   'False
  69.          Height          =   225
  70.          Index           =   9
  71.          Left            =   120
  72.          TabIndex        =   26
  73.          Top             =   240
  74.          Width           =   1365
  75.       End
  76.    End
  77.    Begin Frame zfraPCDataFile 
  78.       BackColor       =   &H00C0C0C0&
  79.       Caption         =   "PC Data File"
  80.       Height          =   915
  81.       Left            =   60
  82.       TabIndex        =   27
  83.       Top             =   3660
  84.       Width           =   7905
  85.       Begin TextBox txtPCFileName 
  86.          FontBold        =   0   'False
  87.          FontItalic      =   0   'False
  88.          FontName        =   "MS Sans Serif"
  89.          FontSize        =   8.25
  90.          FontStrikethru  =   0   'False
  91.          FontUnderline   =   0   'False
  92.          Height          =   285
  93.          Left            =   120
  94.          TabIndex        =   9
  95.          Top             =   480
  96.          Width           =   1695
  97.       End
  98.       Begin TextBox txtPCFileDirectory 
  99.          FontBold        =   0   'False
  100.          FontItalic      =   0   'False
  101.          FontName        =   "MS Sans Serif"
  102.          FontSize        =   8.25
  103.          FontStrikethru  =   0   'False
  104.          FontUnderline   =   0   'False
  105.          Height          =   285
  106.          Left            =   1860
  107.          TabIndex        =   10
  108.          Top             =   480
  109.          Width           =   5955
  110.       End
  111.       Begin Label zlbl 
  112.          BackStyle       =   0  'Transparent
  113.          Caption         =   "Name"
  114.          FontBold        =   0   'False
  115.          FontItalic      =   0   'False
  116.          FontName        =   "MS Sans Serif"
  117.          FontSize        =   8.25
  118.          FontStrikethru  =   0   'False
  119.          FontUnderline   =   0   'False
  120.          Height          =   225
  121.          Index           =   7
  122.          Left            =   120
  123.          TabIndex        =   28
  124.          Top             =   240
  125.          Width           =   1485
  126.       End
  127.       Begin Label zlbl 
  128.          BackStyle       =   0  'Transparent
  129.          Caption         =   "Directory"
  130.          FontBold        =   0   'False
  131.          FontItalic      =   0   'False
  132.          FontName        =   "MS Sans Serif"
  133.          FontSize        =   8.25
  134.          FontStrikethru  =   0   'False
  135.          FontUnderline   =   0   'False
  136.          Height          =   225
  137.          Index           =   8
  138.          Left            =   1860
  139.          TabIndex        =   32
  140.          Top             =   240
  141.          Width           =   1350
  142.       End
  143.    End
  144.    Begin Frame zFra400DataFile 
  145.       BackColor       =   &H00C0C0C0&
  146.       Caption         =   "AS/400 Data File"
  147.       Height          =   915
  148.       Left            =   60
  149.       TabIndex        =   35
  150.       Top             =   1320
  151.       Width           =   4395
  152.       Begin TextBox txtDataFileName 
  153.          FontBold        =   0   'False
  154.          FontItalic      =   0   'False
  155.          FontName        =   "MS Sans Serif"
  156.          FontSize        =   8.25
  157.          FontStrikethru  =   0   'False
  158.          FontUnderline   =   0   'False
  159.          Height          =   285
  160.          Left            =   120
  161.          TabIndex        =   20
  162.          Top             =   480
  163.          Width           =   1935
  164.       End
  165.       Begin TextBox txtDataFileLibrary 
  166.          FontBold        =   0   'False
  167.          FontItalic      =   0   'False
  168.          FontName        =   "MS Sans Serif"
  169.          FontSize        =   8.25
  170.          FontStrikethru  =   0   'False
  171.          FontUnderline   =   0   'False
  172.          Height          =   285
  173.          Left            =   2160
  174.          TabIndex        =   21
  175.          Top             =   480
  176.          Width           =   1935
  177.       End
  178.       Begin Label zlbl 
  179.          BackColor       =   &H00FFFFFF&
  180.          BackStyle       =   0  'Transparent
  181.          Caption         =   "Name"
  182.          FontBold        =   0   'False
  183.          FontItalic      =   0   'False
  184.          FontName        =   "MS Sans Serif"
  185.          FontSize        =   8.25
  186.          FontStrikethru  =   0   'False
  187.          FontUnderline   =   0   'False
  188.          Height          =   225
  189.          Index           =   5
  190.          Left            =   120
  191.          TabIndex        =   36
  192.          Top             =   240
  193.          Width           =   1485
  194.       End
  195.       Begin Label zlbl 
  196.          BackStyle       =   0  'Transparent
  197.          Caption         =   "Library"
  198.          FontBold        =   0   'False
  199.          FontItalic      =   0   'False
  200.          FontName        =   "MS Sans Serif"
  201.          FontSize        =   8.25
  202.          FontStrikethru  =   0   'False
  203.          FontUnderline   =   0   'False
  204.          Height          =   225
  205.          Index           =   6
  206.          Left            =   2160
  207.          TabIndex        =   37
  208.          Top             =   240
  209.          Width           =   1485
  210.       End
  211.    End
  212.    Begin Frame zfra400SaveFile 
  213.       BackColor       =   &H00C0C0C0&
  214.       Caption         =   "AS/400 Save File"
  215.       Height          =   915
  216.       Left            =   60
  217.       TabIndex        =   31
  218.       Top             =   360
  219.       Width           =   4395
  220.       Begin TextBox txtSaveFileName 
  221.          FontBold        =   0   'False
  222.          FontItalic      =   0   'False
  223.          FontName        =   "MS Sans Serif"
  224.          FontSize        =   8.25
  225.          FontStrikethru  =   0   'False
  226.          FontUnderline   =   0   'False
  227.          Height          =   285
  228.          Left            =   120
  229.          TabIndex        =   14
  230.          Top             =   480
  231.          Width           =   1935
  232.       End
  233.       Begin TextBox txtSaveFileLibrary 
  234.          FontBold        =   0   'False
  235.          FontItalic      =   0   'False
  236.          FontName        =   "MS Sans Serif"
  237.          FontSize        =   8.25
  238.          FontStrikethru  =   0   'False
  239.          FontUnderline   =   0   'False
  240.          Height          =   285
  241.          Left            =   2160
  242.          TabIndex        =   15
  243.          Top             =   480
  244.          Width           =   1935
  245.       End
  246.       Begin Label zlbl 
  247.          BackStyle       =   0  'Transparent
  248.          Caption         =   "Name"
  249.          FontBold        =   0   'False
  250.          FontItalic      =   0   'False
  251.          FontName        =   "MS Sans Serif"
  252.          FontSize        =   8.25
  253.          FontStrikethru  =   0   'False
  254.          FontUnderline   =   0   'False
  255.          Height          =   225
  256.          Index           =   3
  257.          Left            =   120
  258.          TabIndex        =   34
  259.          Top             =   240
  260.          Width           =   1485
  261.       End
  262.       Begin Label zlbl 
  263.          BackStyle       =   0  'Transparent
  264.          Caption         =   "Library"
  265.          FontBold        =   0   'False
  266.          FontItalic      =   0   'False
  267.          FontName        =   "MS Sans Serif"
  268.          FontSize        =   8.25
  269.          FontStrikethru  =   0   'False
  270.          FontUnderline   =   0   'False
  271.          Height          =   225
  272.          Index           =   4
  273.          Left            =   2160
  274.          TabIndex        =   33
  275.          Top             =   240
  276.          Width           =   1485
  277.       End
  278.    End
  279.    Begin Frame zfraSaveObject 
  280.       BackColor       =   &H00C0C0C0&
  281.       Caption         =   "Save Object"
  282.       Height          =   1335
  283.       Left            =   60
  284.       TabIndex        =   30
  285.       Top             =   2280
  286.       Width           =   7905
  287.       Begin ComboBox cboObjectRelease 
  288.          FontBold        =   0   'False
  289.          FontItalic      =   0   'False
  290.          FontName        =   "MS Sans Serif"
  291.          FontSize        =   8.25
  292.          FontStrikethru  =   0   'False
  293.          FontUnderline   =   0   'False
  294.          Height          =   315
  295.          Left            =   6390
  296.          TabIndex        =   4
  297.          Top             =   480
  298.          Width           =   1215
  299.       End
  300.       Begin CommandButton cmdCreate 
  301.          Caption         =   "&Create Save Set"
  302.          FontBold        =   0   'False
  303.          FontItalic      =   0   'False
  304.          FontName        =   "MS Sans Serif"
  305.          FontSize        =   8.25
  306.          FontStrikethru  =   0   'False
  307.          FontUnderline   =   0   'False
  308.          Height          =   330
  309.          Left            =   2370
  310.          TabIndex        =   6
  311.          Top             =   870
  312.          Width           =   1785
  313.       End
  314.       Begin CommandButton cmdSets 
  315.          Caption         =   "Selec&t Save Set"
  316.          FontBold        =   0   'False
  317.          FontItalic      =   0   'False
  318.          FontName        =   "MS Sans Serif"
  319.          FontSize        =   8.25
  320.          FontStrikethru  =   0   'False
  321.          FontUnderline   =   0   'False
  322.          Height          =   330
  323.          Left            =   120
  324.          TabIndex        =   5
  325.          Top             =   870
  326.          Width           =   1785
  327.       End
  328.       Begin CommandButton cmdSave 
  329.          Caption         =   "&Save"
  330.          FontBold        =   0   'False
  331.          FontItalic      =   0   'False
  332.          FontName        =   "MS Sans Serif"
  333.          FontSize        =   8.25
  334.          FontStrikethru  =   0   'False
  335.          FontUnderline   =   0   'False
  336.          Height          =   330
  337.          Left            =   4590
  338.          TabIndex        =   8
  339.          Top             =   870
  340.          Width           =   1785
  341.       End
  342.       Begin TextBox txtObjectName 
  343.          FontBold        =   0   'False
  344.          FontItalic      =   0   'False
  345.          FontName        =   "MS Sans Serif"
  346.          FontSize        =   8.25
  347.          FontStrikethru  =   0   'False
  348.          FontUnderline   =   0   'False
  349.          Height          =   285
  350.          Left            =   120
  351.          TabIndex        =   1
  352.          Top             =   480
  353.          Width           =   1935
  354.       End
  355.       Begin TextBox txtObjectLibrary 
  356.          FontBold        =   0   'False
  357.          FontItalic      =   0   'False
  358.          FontName        =   "MS Sans Serif"
  359.          FontSize        =   8.25
  360.          FontStrikethru  =   0   'False
  361.          FontUnderline   =   0   'False
  362.          Height          =   285
  363.          Left            =   2160
  364.          TabIndex        =   2
  365.          Top             =   480
  366.          Width           =   1935
  367.       End
  368.       Begin ComboBox cboObjectType 
  369.          FontBold        =   0   'False
  370.          FontItalic      =   0   'False
  371.          FontName        =   "MS Sans Serif"
  372.          FontSize        =   8.25
  373.          FontStrikethru  =   0   'False
  374.          FontUnderline   =   0   'False
  375.          Height          =   315
  376.          Left            =   4560
  377.          TabIndex        =   3
  378.          Top             =   480
  379.          Width           =   1215
  380.       End
  381.       Begin ComboBox cboSets 
  382.          FontBold        =   0   'False
  383.          FontItalic      =   0   'False
  384.          FontName        =   "MS Sans Serif"
  385.          FontSize        =   8.25
  386.          FontStrikethru  =   0   'False
  387.          FontUnderline   =   0   'False
  388.          Height          =   315
  389.          Left            =   120
  390.          Sorted          =   -1  'True
  391.          Style           =   2  'Dropdown List
  392.          TabIndex        =   0
  393.          Top             =   480
  394.          Visible         =   0   'False
  395.          Width           =   7695
  396.       End
  397.       Begin CommandButton cmdDelete 
  398.          Caption         =   "&Delete Save Set"
  399.          FontBold        =   0   'False
  400.          FontItalic      =   0   'False
  401.          FontName        =   "MS Sans Serif"
  402.          FontSize        =   8.25
  403.          FontStrikethru  =   0   'False
  404.          FontUnderline   =   0   'False
  405.          Height          =   330
  406.          Left            =   2370
  407.          TabIndex        =   7
  408.          Top             =   870
  409.          Visible         =   0   'False
  410.          Width           =   1785
  411.       End
  412.       Begin Label zlbl 
  413.          BackStyle       =   0  'Transparent
  414.          Caption         =   "Release"
  415.          FontBold        =   0   'False
  416.          FontItalic      =   0   'False
  417.          FontName        =   "MS Sans Serif"
  418.          FontSize        =   8.25
  419.          FontStrikethru  =   0   'False
  420.          FontUnderline   =   0   'False
  421.          Height          =   225
  422.          Index           =   14
  423.          Left            =   6390
  424.          TabIndex        =   45
  425.          Top             =   240
  426.          Width           =   855
  427.       End
  428.       Begin Label zlbl 
  429.          BackStyle       =   0  'Transparent
  430.          Caption         =   "Name"
  431.          FontBold        =   0   'False
  432.          FontItalic      =   0   'False
  433.          FontName        =   "MS Sans Serif"
  434.          FontSize        =   8.25
  435.          FontStrikethru  =   0   'False
  436.          FontUnderline   =   0   'False
  437.          Height          =   225
  438.          Index           =   0
  439.          Left            =   120
  440.          TabIndex        =   22
  441.          Top             =   240
  442.          Width           =   1485
  443.       End
  444.       Begin Label zlbl 
  445.          BackStyle       =   0  'Transparent
  446.          Caption         =   "Library"
  447.          FontBold        =   0   'False
  448.          FontItalic      =   0   'False
  449.          FontName        =   "MS Sans Serif"
  450.          FontSize        =   8.25
  451.          FontStrikethru  =   0   'False
  452.          FontUnderline   =   0   'False
  453.          Height          =   225
  454.          Index           =   1
  455.          Left            =   2160
  456.          TabIndex        =   23
  457.          Top             =   240
  458.          Width           =   1485
  459.       End
  460.       Begin Label zlbl 
  461.          BackStyle       =   0  'Transparent
  462.          Caption         =   "Type"
  463.          FontBold        =   0   'False
  464.          FontItalic      =   0   'False
  465.          FontName        =   "MS Sans Serif"
  466.          FontSize        =   8.25
  467.          FontStrikethru  =   0   'False
  468.          FontUnderline   =   0   'False
  469.          Height          =   225
  470.          Index           =   2
  471.          Left            =   4560
  472.          TabIndex        =   24
  473.          Top             =   240
  474.          Width           =   1485
  475.       End
  476.    End
  477.    Begin Frame zfraServerProgram 
  478.       BackColor       =   &H00C0C0C0&
  479.       Caption         =   "AS/400 Server Program"
  480.       Height          =   1875
  481.       Left            =   4530
  482.       TabIndex        =   29
  483.       Top             =   360
  484.       Width           =   3435
  485.       Begin ComboBox cboSystems 
  486.          FontBold        =   0   'False
  487.          FontItalic      =   0   'False
  488.          FontName        =   "MS Sans Serif"
  489.          FontSize        =   8.25
  490.          FontStrikethru  =   0   'False
  491.          FontUnderline   =   0   'False
  492.          Height          =   315
  493.          Left            =   90
  494.          Style           =   2  'Dropdown List
  495.          TabIndex        =   44
  496.          Top             =   450
  497.          Width           =   1905
  498.       End
  499.       Begin ComboBox cboPriority 
  500.          FontBold        =   0   'False
  501.          FontItalic      =   0   'False
  502.          FontName        =   "MS Sans Serif"
  503.          FontSize        =   8.25
  504.          FontStrikethru  =   0   'False
  505.          FontUnderline   =   0   'False
  506.          Height          =   315
  507.          Left            =   2340
  508.          Style           =   2  'Dropdown List
  509.          TabIndex        =   19
  510.          Top             =   1440
  511.          Width           =   795
  512.       End
  513.       Begin TextBox txtServerLibrary 
  514.          FontBold        =   0   'False
  515.          FontItalic      =   0   'False
  516.          FontName        =   "MS Sans Serif"
  517.          FontSize        =   8.25
  518.          FontStrikethru  =   0   'False
  519.          FontUnderline   =   0   'False
  520.          Height          =   285
  521.          Left            =   90
  522.          TabIndex        =   16
  523.          Top             =   1440
  524.          Width           =   1935
  525.       End
  526.       Begin OptionButton optServerMethod 
  527.          BackColor       =   &H00C0C0C0&
  528.          Caption         =   "REXX"
  529.          FontBold        =   0   'False
  530.          FontItalic      =   0   'False
  531.          FontName        =   "MS Sans Serif"
  532.          FontSize        =   8.25
  533.          FontStrikethru  =   0   'False
  534.          FontUnderline   =   0   'False
  535.          Height          =   225
  536.          Index           =   1
  537.          Left            =   2340
  538.          TabIndex        =   18
  539.          Top             =   720
  540.          Width           =   855
  541.       End
  542.       Begin OptionButton optServerMethod 
  543.          BackColor       =   &H00C0C0C0&
  544.          Caption         =   "RPG"
  545.          FontBold        =   0   'False
  546.          FontItalic      =   0   'False
  547.          FontName        =   "MS Sans Serif"
  548.          FontSize        =   8.25
  549.          FontStrikethru  =   0   'False
  550.          FontUnderline   =   0   'False
  551.          Height          =   225
  552.          Index           =   0
  553.          Left            =   2340
  554.          TabIndex        =   17
  555.          Top             =   480
  556.          Value           =   -1  'True
  557.          Width           =   735
  558.       End
  559.       Begin Label zlbl 
  560.          BackStyle       =   0  'Transparent
  561.          Caption         =   "Type"
  562.          FontBold        =   0   'False
  563.          FontItalic      =   0   'False
  564.          FontName        =   "MS Sans Serif"
  565.          FontSize        =   8.25
  566.          FontStrikethru  =   0   'False
  567.          FontUnderline   =   0   'False
  568.          Height          =   225
  569.          Index           =   13
  570.          Left            =   2310
  571.          TabIndex        =   43
  572.          Top             =   240
  573.          Width           =   615
  574.       End
  575.       Begin Label zlbl 
  576.          BackStyle       =   0  'Transparent
  577.          Caption         =   "System"
  578.          FontBold        =   0   'False
  579.          FontItalic      =   0   'False
  580.          FontName        =   "MS Sans Serif"
  581.          FontSize        =   8.25
  582.          FontStrikethru  =   0   'False
  583.          FontUnderline   =   0   'False
  584.          Height          =   225
  585.          Index           =   12
  586.          Left            =   90
  587.          TabIndex        =   42
  588.          Top             =   240
  589.          Width           =   615
  590.       End
  591.       Begin Label zlbl 
  592.          BackStyle       =   0  'Transparent
  593.          Caption         =   "Priority"
  594.          FontBold        =   0   'False
  595.          FontItalic      =   0   'False
  596.          FontName        =   "MS Sans Serif"
  597.          FontSize        =   8.25
  598.          FontStrikethru  =   0   'False
  599.          FontUnderline   =   0   'False
  600.          Height          =   225
  601.          Index           =   11
  602.          Left            =   2340
  603.          TabIndex        =   39
  604.          Top             =   1170
  605.          Width           =   615
  606.       End
  607.       Begin Label zlbl 
  608.          BackStyle       =   0  'Transparent
  609.          Caption         =   "Library"
  610.          FontBold        =   0   'False
  611.          FontItalic      =   0   'False
  612.          FontName        =   "MS Sans Serif"
  613.          FontSize        =   8.25
  614.          FontStrikethru  =   0   'False
  615.          FontUnderline   =   0   'False
  616.          Height          =   225
  617.          Index           =   10
  618.          Left            =   90
  619.          TabIndex        =   38
  620.          Top             =   1200
  621.          Width           =   915
  622.       End
  623.    End
  624.    Begin CommandButton cmdExit 
  625.       Caption         =   "E&xit"
  626.       FontBold        =   0   'False
  627.       FontItalic      =   0   'False
  628.       FontName        =   "MS Sans Serif"
  629.       FontSize        =   8.25
  630.       FontStrikethru  =   0   'False
  631.       FontUnderline   =   0   'False
  632.       Height          =   330
  633.       Left            =   6150
  634.       TabIndex        =   13
  635.       Top             =   5130
  636.       Width           =   1785
  637.    End
  638.    Begin Label lblStatus 
  639.       Alignment       =   2  'Center
  640.       BackColor       =   &H00000000&
  641.       ForeColor       =   &H0000FF00&
  642.       Height          =   255
  643.       Left            =   1320
  644.       TabIndex        =   41
  645.       Top             =   60
  646.       Width           =   6645
  647.    End
  648.    Begin Label lblTime 
  649.       Alignment       =   2  'Center
  650.       BackColor       =   &H00000000&
  651.       ForeColor       =   &H0000FF00&
  652.       Height          =   255
  653.       Left            =   60
  654.       TabIndex        =   40
  655.       Top             =   60
  656.       Width           =   1275
  657.    End
  658. Option Explicit
  659.  ' Constants:
  660.   Const bGet = True                     ' get default info
  661.   Const bSAVE = False                   ' save default info
  662.   Const nSAVEFILE_RECORD_SIZE = 528     ' record size in save file
  663.   Const sSERVER_RPG = "SROBJRPG"        ' RPG server
  664.   Const sSERVER_REX = "SROBJREX"        ' REXX server
  665.   Const sSOURCE_REX = "SRCREX"          ' REXX source file
  666.  ' Variables:
  667.   Dim bSaving        As Integer         ' running a save
  668.   Dim nRC            As Integer         ' return code
  669.   Dim sINIFile       As String          ' application INI file
  670.   Dim sCmd           As String          ' remote command to execute
  671.   Dim sMsgs          As String          ' remote command messages returned
  672.   Dim sPartnerSYS    As String          ' Partner system
  673. Sub AppDefaults (bGet As Integer)
  674.  ' Description:
  675.  '  Get or save defaults
  676.  ' Parameters:
  677.  '  bGet           get defaults from file
  678.  ' Constants:
  679.   Const sSECTION1 = "SERVER"
  680.   Const sSECTION2 = "OBJECT"
  681.   Const sSECTION3 = "SAVEFILE"
  682.   Const sSECTION4 = "DATAFILE"
  683.   Const sSECTION5 = "PCFILE"
  684.   Const sSECTION6 = "RESTORE"
  685.   Const sTOPIC1 = "Library"
  686.   Const sTOPIC2 = "Type"
  687.   Const sTOPIC3 = "Name"
  688.   Const sTOPIC4 = "Priority"
  689.   Const sTOPIC5 = "System"
  690.   Const sTOPIC6 = "Release"
  691.   Const sVALUE1 = "RPG"
  692.   Const sVALUE2 = "REXX"
  693.  ' Variables:
  694.   Dim n1  As Integer
  695.   Dim nRC As Integer
  696.   Dim s1  As String
  697.   MousePointer = HOURGLASS
  698.   ' setup file reference
  699.   nRC = zzINISetFile(sINIFile)
  700.   ' if getting defaults
  701.   If bGet Then
  702.     ' setup first section
  703.     nRC = zzINISetSection(sSECTION1)
  704.     ' put list of systems into control
  705.     Call zzCAPutSystemListIntoCtrl(Me.hWnd, cboSystems)
  706.     ' get AS/400 server name
  707.     nRC = zzINIGetString(sTOPIC5, sPartnerSYS)
  708.     ' see if match found
  709.     For n1 = 0 To cboSystems.ListCount - 1
  710.       If cboSystems.List(n1) = sPartnerSYS Then
  711.         cboSystems.ListIndex = n1
  712.         Exit For
  713.       End If
  714.     Next
  715.     ' get server library
  716.     nRC = zzINIGetStringIntoTB(sTOPIC1, txtServerLibrary)
  717.     ' get RPG/REXX option
  718.     nRC = zzINIGetString(sTOPIC2, s1)
  719.     optServerMethod(0).Value = (s1 = sVALUE1)
  720.     optServerMethod(1).Value = (s1 = sVALUE2)
  721.     ' get job priority option
  722.     nRC = zzINIGetInteger(sTOPIC4, n1)
  723.     cboPriority.ListIndex = n1
  724.     ' get object information
  725.     nRC = zzINISetSection(sSECTION2)
  726.     nRC = zzINIGetStringIntoTB(sTOPIC3, txtObjectName)
  727.     nRC = zzINIGetStringIntoTB(sTOPIC1, txtObjectLibrary)
  728.     nRC = zzINIGetStringIntoTB(sTOPIC2, cboObjectType)
  729.     nRC = zzINIGetStringIntoTB(sTOPIC6, cboObjectRelease)
  730.     ' get save file information
  731.     nRC = zzINISetSection(sSECTION3)
  732.     nRC = zzINIGetStringIntoTB(sTOPIC3, txtSaveFileName)
  733.     nRC = zzINIGetStringIntoTB(sTOPIC1, txtSaveFileLibrary)
  734.     ' get data file information
  735.     nRC = zzINISetSection(sSECTION4)
  736.     nRC = zzINIGetStringIntoTB(sTOPIC3, txtDataFileName)
  737.     nRC = zzINIGetStringIntoTB(sTOPIC1, txtDataFileLibrary)
  738.     ' get PC file information
  739.     nRC = zzINISetSection(sSECTION5)
  740.     nRC = zzINIGetStringIntoTB(sTOPIC3, txtPCFileName)
  741.     nRC = zzINIGetStringIntoTB(sTOPIC1, txtPCFileDirectory)
  742.     ' get restore library information
  743.     nRC = zzINISetSection(sSECTION6)
  744.     nRC = zzINIGetStringIntoTB(sTOPIC1, txtRestoreLibrary)
  745.     ' get save sets
  746.     Call SaveSets(bGet)
  747.   ' if saving defaults
  748.   Else
  749.     ' save AS/400 server library, type, priority
  750.     nRC = zzINISetSection(sSECTION1)
  751.     nRC = zzINIPutString(sTOPIC5, sPartnerSYS)
  752.     nRC = zzINIPutString(sTOPIC1, txtServerLibrary.Text)
  753.     If optServerMethod(0) Then
  754.       nRC = zzINIPutString(sTOPIC2, sVALUE1)
  755.     Else
  756.       nRC = zzINIPutString(sTOPIC2, sVALUE2)
  757.     End If
  758.     nRC = zzINIPutInteger(sTOPIC4, cboPriority.ListIndex)
  759.     ' save object information
  760.     nRC = zzINISetSection(sSECTION2)
  761.     nRC = zzINIPutString(sTOPIC3, txtObjectName.Text)
  762.     nRC = zzINIPutString(sTOPIC1, txtObjectLibrary.Text)
  763.     nRC = zzINIPutString(sTOPIC2, cboObjectType.Text)
  764.     nRC = zzINIPutString(sTOPIC6, cboObjectRelease.Text)
  765.     ' save save file information
  766.     nRC = zzINISetSection(sSECTION3)
  767.     nRC = zzINIPutString(sTOPIC3, txtSaveFileName.Text)
  768.     nRC = zzINIPutString(sTOPIC1, txtSaveFileLibrary.Text)
  769.     ' save data file information
  770.     nRC = zzINISetSection(sSECTION4)
  771.     nRC = zzINIPutString(sTOPIC3, txtDataFileName.Text)
  772.     nRC = zzINIPutString(sTOPIC1, txtDataFileLibrary.Text)
  773.     ' save PC file information
  774.     nRC = zzINISetSection(sSECTION5)
  775.     nRC = zzINIPutString(sTOPIC3, txtPCFileName.Text)
  776.     nRC = zzINIPutString(sTOPIC1, txtPCFileDirectory.Text)
  777.     ' save restore library information
  778.     nRC = zzINISetSection(sSECTION6)
  779.     nRC = zzINIPutString(sTOPIC1, txtRestoreLibrary.Text)
  780.     ' save save sets
  781.     Call SaveSets(bGet)
  782.   End If
  783.   MousePointer = DEFAULT
  784. End Sub
  785. Sub cboObjectRelease_KeyPress (KeyASCII As Integer)
  786.   ' gobble enter key and convert entry to uppercase
  787.   Call Gobble(cboObjectRelease, KeyASCII)
  788. End Sub
  789. Sub cboObjectType_KeyPress (KeyASCII As Integer)
  790.   ' gobble enter key and convert entry to uppercase
  791.   Call Gobble(cboObjectType, KeyASCII)
  792. End Sub
  793. Sub cboSets_Click ()
  794.  ' Variables:
  795.   Dim n2       As Integer
  796.   Dim s1       As String
  797.   Dim sDir     As String
  798.   Dim sFile    As String
  799.   Dim sLib     As String
  800.   Dim sName    As String
  801.   Dim sPath    As String
  802.   Dim sRelease As String
  803.   Dim sType    As String
  804.   ' if form done loading
  805.   If tmrDisplay.Enabled Then
  806.     ' if item selected
  807.     If cboSets.ListIndex >= 0 Then
  808.       ' get currently selected item
  809.       s1 = cboSets.List(cboSets.ListIndex)
  810.       ' find library/name seperator
  811.       n2 = InStr(s1, "/")
  812.       If n2 > 0 Then
  813.         
  814.         ' get library
  815.         sLib = Left$(s1, n2 - 1)
  816.         s1 = Mid$(s1, n2 + 1)
  817.       
  818.         ' get object name
  819.         n2 = InStr(s1, " ")
  820.         If n2 > 0 Then
  821.           sName = Left$(s1, n2 - 1)
  822.           s1 = Mid$(s1, n2 + 1)
  823.           
  824.           ' get object type
  825.           n2 = InStr(s1, " to ")
  826.           If n2 > 0 Then
  827.             sType = Left$(s1, n2 - 1)
  828.             
  829.             ' get directory and file
  830.             s1 = Mid$(s1, n2 + 4)
  831.             n2 = InStr(s1, " *")
  832.             If n2 = 0 Then n2 = InStr(s1, " V")
  833.             If n2 > 0 Then
  834.               sPath = Left$(s1, n2 - 1)
  835.               sRelease = Mid$(s1, n2 + 1)
  836.             Else
  837.               sPath = s1
  838.               sRelease = "*CURRENT"
  839.             End If
  840.             
  841.             ' parse path name
  842.             Call zzFileParse(sPath, sDir, sFile)
  843.           End If
  844.         End If
  845.       
  846.       End If
  847.       
  848.     End If
  849.     ' setup controls
  850.     If sName <> gsEMPTY Then txtObjectName = sName
  851.     If sLib <> gsEMPTY Then txtObjectLibrary = sLib
  852.     If sType <> gsEMPTY Then cboObjectType = sType
  853.     If sRelease <> gsEMPTY Then cboObjectRelease = sRelease
  854.     If sFile <> gsEMPTY Then txtPCFileName = sFile
  855.     If sDir <> gsEMPTY Then txtPCFileDirectory = sDir
  856.   End If
  857. End Sub
  858. Sub cboSystems_Click ()
  859.   ' place selected system in variable
  860.   sPartnerSYS = cboSystems.Text
  861. End Sub
  862. Sub cmdCreate_Click ()
  863.  ' Description:
  864.  '  Creates a save set entry if one
  865.  '  does not already exist
  866.  ' Variables:
  867.   Dim n1    As Integer
  868.   Dim s1    As String
  869.   ' if maximum has not been reached
  870.   If cboSets.ListCount < 100 Then
  871.     ' if valid values in controls
  872.     If txtObjectName.Text <> gsEMPTY Then
  873.       If txtObjectLibrary.Text <> gsEMPTY Then
  874.         If cboObjectType.Text <> gsEMPTY Then
  875.           If cboObjectRelease.Text <> gsEMPTY Then
  876.             ' build string to add to combo box
  877.             s1 = UCase$(Trim$(txtObjectLibrary.Text) & "/" & Trim$(txtObjectName.Text) & " " & Trim$(cboObjectType.Text))
  878.             s1 = s1 & " to " & UCase$(zzPathFormat(Trim$(txtPCFileDirectory.Text)) & Trim$(txtPCFileName.Text))
  879.             s1 = s1 & " " & UCase$(cboObjectRelease.Text)
  880.             
  881.             ' see if already in combo box
  882.             ' if it is then no use to add it again
  883.             For n1 = 0 To cboSets.ListCount - 1
  884.               If s1 = cboSets.List(n1) Then
  885.                 If Not bSaving Then MsgBox "'" & s1 & "' already exists as save set.", MB_ICONSTOP
  886.                 Exit Sub
  887.               End If
  888.             Next n1
  889.       
  890.             ' add the new entry
  891.             cboSets.AddItem s1
  892.           End If
  893.         End If
  894.       End If
  895.     End If
  896.   End If
  897. End Sub
  898. Sub cmdDelete_Click ()
  899.   ' remove current entry
  900.   If cboSets.ListIndex >= 0 Then
  901.     ' setup message box
  902.     gsMBText = "Are you sure you wish to delete current entry '"
  903.     gsMBText = gsMBText & cboSets.List(cboSets.ListIndex) & "'?"
  904.     If MsgBox(gsMBText, MB_ICONQUESTION Or MB_YESNO) = IDYES Then
  905.       
  906.       ' remove entry
  907.       cboSets.RemoveItem cboSets.ListIndex
  908.       cboSets.Refresh
  909.       If cboSets.ListCount > 0 Then
  910.         cboSets.ListIndex = 0
  911.       Else
  912.         cboSets.ListIndex = -1
  913.       End If
  914.       cmdDelete.Enabled = cboSets.ListCount > 0
  915.     End If
  916.   End If
  917. End Sub
  918. Sub cmdExit_Click ()
  919.   Unload Me
  920. End Sub
  921. Sub cmdRestore_Click ()
  922.  ' Description:
  923.  '  Restore object(s)
  924.  ' Variables:
  925.   Dim sLibrary          As String     ' original sav library
  926.   Dim sObjectsRestored  As String     ' text showing number of objects restored
  927.   ' please wait...
  928.   Screen.MousePointer = HOURGLASS
  929.   ' validate the data
  930.   If DataValidation(False) <> True Then GoTo cmdRestoreExit
  931.   ' get library name
  932.   If GetSaveLibrary(sLibrary) <> True Then GoTo cmdRestoreExit
  933.   ' set job priority, ignore messages that
  934.   lblStatus = "Setting job priority"
  935.   lblStatus.Refresh
  936.   sCmd = "CHGJOB RUNPTY(" & cboPriority.Text & ")"
  937.   If RunCmd(gsEMPTY, gsEMPTY) <> True Then GoTo cmdRestoreExit
  938.   ' create the libary, ignore messages that
  939.   ' library created (CPC2102) or library already exists (CPF2111)
  940.   lblStatus = "Library " & txtRestoreLibrary & " being created"
  941.   lblStatus.Refresh
  942.   sCmd = "CRTLIB LIB(" & txtRestoreLibrary & ")"
  943.   If RunCmd("CPC2102", "CPF2111") <> True Then GoTo cmdRestoreExit
  944.   ' create the data file, ignore messages that
  945.   ' file created (CPC7301) or already exists (CPF5813)
  946.   lblStatus = "Data file " & txtDataFileLibrary & "/" & txtDataFileName & " being created"
  947.   lblStatus.Refresh
  948.   sCmd = "CRTPF FILE(" & txtDataFileLibrary & "/" & txtDataFileName & ") RCDLEN(528)"
  949.   If RunCmd("CPC7301", "CPF5813") <> True Then GoTo cmdRestoreExit
  950.   ' clear the data file, ignore messages that
  951.   ' physical file cleared (CPC3101)
  952.   lblStatus = "Data file " & txtDataFileLibrary & "/" & txtDataFileName & " being cleared"
  953.   lblStatus.Refresh
  954.   sCmd = "CLRPFM FILE(" & txtDataFileLibrary & "/" & txtDataFileName & ")"
  955.   If RunCmd("CPC3101", gsEMPTY) <> True Then GoTo cmdRestoreExit
  956.   ' transfer the file from the pc
  957.   lblStatus = "PC file being copied to data file"
  958.   lblStatus.Refresh
  959.   If ObjectUpload() <> True Then GoTo cmdRestoreExit
  960.   ' create save file, ignore messages that
  961.   ' file created (CPC7301) or already exists (CPF5813)
  962.   lblStatus = "Save file " & txtSaveFileLibrary & "/" & txtSaveFileName & " being created"
  963.   lblStatus.Refresh
  964.   sCmd = "CRTSAVF FILE(" & txtSaveFileLibrary & "/" & txtSaveFileName & ")"
  965.   If RunCmd("CPC7301", "CPF5813") <> True Then GoTo cmdRestoreExit
  966.   ' clear the savefile, ignore messages that file cleared
  967.   lblStatus = "Save file " & txtSaveFileLibrary & "/" & txtSaveFileName & " being cleared"
  968.   lblStatus.Refresh
  969.   sCmd = "CLRSAVF FILE(" & txtSaveFileLibrary & "/" & txtSaveFileName & ")"
  970.   If RunCmd("CPC3725", gsEMPTY) <> True Then GoTo cmdRestoreExit
  971.   ' use RPG to copy data file to save file
  972.   If optServerMethod(0) = True Then
  973.     lblStatus = "Data file being copied to save file"
  974.     lblStatus.Refresh
  975.     sCmd = "CALL " & txtServerLibrary & "/" & sSERVER_RPG & " ('" & txtSaveFileName & "' '" & txtSaveFileLibrary & "' '" & txtDataFileName & "' '" & txtDataFileLibrary & "' 'TOSAVF')"
  976.     If RunCmd(gsEMPTY, gsEMPTY) <> True Then GoTo cmdRestoreExit
  977.   ' use REXX to copy data file to save file
  978.   Else
  979.     lblStatus = "Data file being copied to save file"
  980.     lblStatus.Refresh
  981.     sCmd = "STRREXPRC SRCMBR(" & sSERVER_REX & ") SRCFILE(" & txtServerLibrary & "/" & sSOURCE_REX & ") PARM('" & txtSaveFileLibrary & "/" & txtSaveFileName & " tosavf " & txtDataFileLibrary & "/" & txtDataFileName & "')"
  982.     If RunCmd(gsEMPTY, gsEMPTY) <> True Then GoTo cmdRestoreExit
  983.   End If
  984.   ' restore the object, ignore messages that
  985.   ' xxxx number of objects restored (CPC3703)
  986.   lblStatus = "Object(s) being restored"
  987.   lblStatus.Refresh
  988.   sCmd = "RSTOBJ OBJ(" & txtObjectName & ") SAVLIB(" & sLibrary & ") DEV(*SAVF) OBJTYPE(" & cboObjectType.Text & ") SAVF(" & txtSaveFileLibrary & "/" & txtSaveFileName & ") RSTLIB(" & txtRestoreLibrary & ")"
  989.   If RunCmd("CPC3703", gsEMPTY) <> True Then GoTo cmdRestoreExit
  990.   ' see how many objects restored
  991.   sObjectsRestored = Trim$(Mid$(sMsgs, InStr(sMsgs, ":") + 1))
  992.   If Len(sObjectsRestored) > 3 Then sObjectsRestored = Left$(sObjectsRestored, Len(sObjectsRestored) - 3)
  993.   lblStatus = sObjectsRestored
  994.   lblStatus.Refresh
  995. ' end of save sequence
  996. cmdRestoreExit:
  997.   ' end "orphaned" remote command job
  998.   nRC = zzSREndConversation(Me.hWnd, cboSystems.Text)
  999.   Screen.MousePointer = DEFAULT
  1000. End Sub
  1001. Sub cmdSave_Click ()
  1002.  ' Description:
  1003.  '  Save object(s)
  1004.                  
  1005.  ' Variables:
  1006.   Dim sObjsSaved  As String     ' text showing number of objects saved
  1007.   lblStatus = gsEMPTY
  1008.   Screen.MousePointer = HOURGLASS
  1009.   ' set saving flag
  1010.   bSaving = True
  1011.   ' save current object(s)
  1012.   ' as save set entry
  1013.   cmdCreate = True
  1014.   ' validate the data
  1015.   If DataValidation(True) <> True Then GoTo cmdSaveExit
  1016.   ' set job priority, ignore messages that
  1017.   lblStatus = "Setting job priority"
  1018.   lblStatus.Refresh
  1019.   sCmd = "CHGJOB RUNPTY(" & cboPriority.Text & ")"
  1020.   If RunCmd(gsEMPTY, gsEMPTY) <> True Then GoTo cmdSaveExit
  1021.   ' create save file, ignore messages that
  1022.   ' file created (CPC7301) or already exists (CPF5813)
  1023.   lblStatus = "Save file " & txtSaveFileLibrary & "/" & txtSaveFileName & " being created"
  1024.   lblStatus.Refresh
  1025.   sCmd = "CRTSAVF FILE(" & txtSaveFileLibrary & "/" & txtSaveFileName & ")"
  1026.   If RunCmd("CPC7301", "CPF5813") <> True Then GoTo cmdSaveExit
  1027.   ' clear the save file, ignore messages that
  1028.   ' save file cleared (CPC3725)
  1029.   lblStatus = "Save file " & txtSaveFileLibrary & "/" & txtSaveFileName & " being cleared"
  1030.   lblStatus.Refresh
  1031.   sCmd = "CLRSAVF FILE(" & txtSaveFileLibrary & "/" & txtSaveFileName & ")"
  1032.   If RunCmd("CPC3725", gsEMPTY) <> True Then GoTo cmdSaveExit
  1033.   ' create the data file, ignore messages that
  1034.   ' file created (CPC7301) or already exists (CPF5813)
  1035.   lblStatus = "Data file " & txtDataFileLibrary & "/" & txtDataFileName & " being created"
  1036.   lblStatus.Refresh
  1037.   sCmd = "CRTPF FILE(" & txtDataFileLibrary & "/" & txtDataFileName & ") RCDLEN(528)"
  1038.   If RunCmd("CPC7301", "CPF5813") <> True Then GoTo cmdSaveExit
  1039.   ' clear the data file, ignore messages that
  1040.   ' physical file cleared (CPC3101)
  1041.   lblStatus = "Data file " & txtDataFileLibrary & "/" & txtDataFileName & " being cleared"
  1042.   lblStatus.Refresh
  1043.   sCmd = "CLRPFM FILE(" & txtDataFileLibrary & "/" & txtDataFileName & ")"
  1044.   If RunCmd("CPC3101", gsEMPTY) <> True Then GoTo cmdSaveExit
  1045.   ' save the object(s), ignore messages that
  1046.   ' xxxx number of objects saved
  1047.   lblStatus = "Object(s) being saved to save file"
  1048.   lblStatus.Refresh
  1049.   sCmd = "SAVOBJ OBJ(" & txtObjectName & ") LIB(" & txtObjectLibrary & ") DEV(*SAVF) OBJTYPE(" & cboObjectType.Text & ") SAVF(" & txtSaveFileLibrary & "/" & txtSaveFileName & ") TGTRLS(" & cboObjectRelease.Text & ")"
  1050.   If RunCmd("CPC3722", "CPC3723") <> True Then GoTo cmdSaveExit
  1051.   ' see how many objects saved
  1052.   sObjsSaved = Trim$(Mid$(sMsgs, InStr(sMsgs, ":") + 1))
  1053.   If Len(sObjsSaved) > 3 Then sObjsSaved = Left$(sObjsSaved, Len(sObjsSaved) - 3)
  1054.   ' convert using RPG program
  1055.   If optServerMethod(0) Then
  1056.     lblStatus = "Save file being copied to data file"
  1057.     lblStatus.Refresh
  1058.     sCmd = "CALL " & txtServerLibrary & "/" & sSERVER_RPG & " ('" & txtSaveFileName & "' '" & txtSaveFileLibrary & "' '" & txtDataFileName & "' '" & txtDataFileLibrary & "' 'FROMSAVF')"
  1059.     If RunCmd(gsEMPTY, gsEMPTY) <> True Then GoTo cmdSaveExit
  1060.   ' convert using REXX program
  1061.   Else
  1062.     lblStatus = "Save file being copied to data file"
  1063.     lblStatus.Refresh
  1064.     sCmd = "STRREXPRC SRCMBR(" & sSERVER_REX & ") SRCFILE(" & txtServerLibrary & "/" & sSOURCE_REX & ") PARM('" & txtSaveFileLibrary & "/" & txtSaveFileName & " fromsavf " & txtDataFileLibrary & "/" & txtDataFileName & "')"
  1065.     If RunCmd(gsEMPTY, gsEMPTY) <> True Then GoTo cmdSaveExit
  1066.   End If
  1067.   ' transfer the file to the pc
  1068.   lblStatus = "Data file being copied to PC file"
  1069.   lblStatus.Refresh
  1070.   If ObjectDownload() <> True Then GoTo cmdSaveExit
  1071.   ' show how many objects saved
  1072.   lblStatus = sObjsSaved
  1073.   lblStatus.Refresh
  1074. ' end of save sequence
  1075. cmdSaveExit:
  1076.   ' end "orphaned" remote command job
  1077.   nRC = zzSREndConversation(Me.hWnd, cboSystems.Text)
  1078.   Screen.MousePointer = DEFAULT
  1079.   ' set saving flag off
  1080.   bSaving = False
  1081. End Sub
  1082. Sub cmdSets_Click ()
  1083.   ' if user wants to view save sets
  1084.   If cmdSets.Caption = "Selec&t Save Set" Then
  1085.     ' hide/show controls
  1086.     zlbl(1).Visible = False
  1087.     zlbl(2).Visible = False
  1088.     zlbl(14).Visible = False
  1089.     txtObjectName.Visible = False
  1090.     txtObjectLibrary.Visible = False
  1091.     cboObjectType.Visible = False
  1092.     cboObjectRelease.Visible = False
  1093.     cmdCreate.Visible = False
  1094.     cmdDelete.Visible = True
  1095.     cmdSave.Visible = False
  1096.     cboSets.Visible = True
  1097.     cmdDelete.Visible = True
  1098.     cmdDelete.Enabled = cboSets.ListCount > 0
  1099.     zfraPCDataFile.Visible = False
  1100.     ' set selection if none picked
  1101.     If cboSets.ListCount > 0 Then
  1102.       If cboSets.ListIndex = -1 Then
  1103.         cboSets.ListIndex = 0
  1104.       End If
  1105.     End If
  1106.     ' change captions
  1107.     zlbl(0).Caption = "Save Sets"
  1108.     cmdSets.Caption = "&Hide Save Sets"
  1109.     cboSets.SetFocus
  1110.   Else
  1111.     ' hide/show controls
  1112.     zlbl(0).Visible = True
  1113.     zlbl(1).Visible = True
  1114.     zlbl(2).Visible = True
  1115.     zlbl(14).Visible = True
  1116.     txtObjectName.Visible = True
  1117.     txtObjectLibrary.Visible = True
  1118.     cboObjectType.Visible = True
  1119.     cboObjectRelease.Visible = True
  1120.     cmdCreate.Visible = True
  1121.     cmdSave.Visible = True
  1122.     cboSets.Visible = False
  1123.     cmdDelete.Visible = False
  1124.     zfraPCDataFile.Visible = True
  1125.     ' change captions
  1126.     zlbl(0).Caption = "Name"
  1127.     cmdSets.Caption = "Selec&t Save Set"
  1128.     txtObjectName.SetFocus
  1129.   End If
  1130. End Sub
  1131. Function DataValidation (ByVal bSaving%) As Integer
  1132.  ' Description:
  1133.  '  Makes sure data is correct
  1134.  ' Parameters:
  1135.  '  bSaving              saving object flag
  1136.  ' Variables:
  1137.   Dim nFileNum           As Integer  ' file number
  1138.   Dim sMsg               As String   ' message text
  1139.   Dim sFile              As String   ' file name
  1140.   ' clear messages
  1141.   gsMBText = gsEMPTY
  1142.   ' test system selected
  1143.   If Len(cboSystems) = 0 Then
  1144.     gsMBText = gsMBText & gsCHR_CR & "Object system is blank. Please enter."
  1145.     cboSystems.SetFocus
  1146.   End If
  1147.   ' test object name
  1148.   If Len(Trim$(txtObjectName)) = 0 Then
  1149.     gsMBText = gsMBText & gsCHR_CR & "Object name is blank. Please enter."
  1150.     txtObjectName.SetFocus
  1151.   End If
  1152.   ' test object library
  1153.   If Len(Trim$(txtObjectLibrary)) = 0 Then
  1154.     gsMBText = gsMBText & gsCHR_CR & "Object library is blank. Please enter."
  1155.     txtObjectLibrary.SetFocus
  1156.   End If
  1157.   ' test object type
  1158.   If Len(Trim$(cboObjectType.Text)) = 0 Then
  1159.     gsMBText = gsMBText & gsCHR_CR & "Object type is blank. Please enter or select."
  1160.     cboObjectType.SetFocus
  1161.   End If
  1162.   ' test object release
  1163.   If Len(Trim$(cboObjectRelease.Text)) = 0 Then
  1164.     gsMBText = gsMBText & gsCHR_CR & "Object release level is blank. Please enter or select."
  1165.     cboObjectRelease.SetFocus
  1166.   End If
  1167.   ' test save file name
  1168.   If Len(Trim$(txtSaveFileName)) = 0 Then
  1169.     gsMBText = gsMBText & gsCHR_CR & "Save File name is blank. Please enter."
  1170.     txtSaveFileName.SetFocus
  1171.   End If
  1172.   ' test save File Library
  1173.   If Len(Trim$(txtSaveFileLibrary)) = 0 Then
  1174.     gsMBText = gsMBText & gsCHR_CR & "Save File library is blank. Please enter."
  1175.     txtSaveFileLibrary.SetFocus
  1176.   End If
  1177.   ' test data file name
  1178.   If Len(Trim$(txtDataFileName)) = 0 Then
  1179.     gsMBText = gsMBText & gsCHR_CR & "Data File name is blank. Please enter."
  1180.     txtDataFileName.SetFocus
  1181.   End If
  1182.   ' test data file Library
  1183.   If Len(Trim$(txtDataFileLibrary)) = 0 Then
  1184.     gsMBText = gsMBText & gsCHR_CR & "Data File library is blank. Please enter."
  1185.     txtDataFileLibrary.SetFocus
  1186.   End If
  1187.   ' test restore Library
  1188.   If Len(Trim$(txtRestoreLibrary)) = 0 Then
  1189.     gsMBText = gsMBText & gsCHR_CR & "Restore Library is blank. Please enter."
  1190.     txtRestoreLibrary.SetFocus
  1191.   End If
  1192.   ' test PC file name
  1193.   If Len(Trim$(txtPCFileName)) = 0 Then
  1194.     gsMBText = gsMBText & gsCHR_CR & "PC File name is blank. Please enter."
  1195.     txtPCFileName.SetFocus
  1196.   End If
  1197.   ' test PC Directory
  1198.   If Len(Trim$(txtPCFileDirectory)) = 0 Then
  1199.     gsMBText = gsMBText & gsCHR_CR & "PC File directory is blank. Please enter."
  1200.     txtPCFileDirectory.SetFocus
  1201.   End If
  1202.   ' if no error yet see if file name ok
  1203.   sFile = Trim$(txtPCFileDirectory)
  1204.   If Right$(sFile, 1) <> "\" Then sFile = sFile & "\"
  1205.   sFile = sFile & Trim$(txtPCFileName)
  1206.   ' if PC file exists then
  1207.   If bSaving Then
  1208.     If zzFileExists(sFile) Then
  1209.       sMsg = UCase$(sFile) & " already exists and will be overwritten."
  1210.       sMsg = sMsg & " Do you wish to continue?"
  1211.       If MsgBox(sMsg, MB_ICONQUESTION Or MB_YESNO Or MB_DEFBUTTON2) = IDNO Then
  1212.         gsMBText = gsMBText & gsCHR_CR & "PC File name or directory must be changed to prevent overwrite. Please enter new name and/or directory."
  1213.         txtPCFileName.SetFocus
  1214.       End If
  1215.     End If
  1216.   End If
  1217.   ' handle errors
  1218.   On Error Resume Next
  1219.   Err = 0
  1220.   ' open the file
  1221.   nFileNum = FreeFile
  1222.   Open sFile For Binary As #nFileNum
  1223.   ' if any error then show text on message box
  1224.   If Err <> 0 Then gsMBText = gsMBText & gsCHR_CR & "PC File error: " & Error$
  1225.   ' close file
  1226.   Close #nFileNum
  1227.   On Error GoTo 0
  1228.   ' errors encountered
  1229.   If gsMBText <> gsEMPTY Then
  1230.     MsgBox gsMBText, MB_ICONSTOP
  1231.     DataValidation = False
  1232.   ' errors not found
  1233.   Else
  1234.     DataValidation = True
  1235.   End If
  1236. End Function
  1237. Sub Form_Load ()
  1238.  ' Variables:
  1239.   Dim n1 As Integer
  1240.   ' setup global variables
  1241.   Call zzSetGlobalVariables
  1242.   ' setup title and INI file
  1243.   App.Title = "Save/Restore Server Object"
  1244.   sINIFile = App.Path & "\srobj.ini"
  1245.   ' center form
  1246.   Call zzFormCenter(Me)
  1247.   ' setup object types combo
  1248.   Call ObjectTypes
  1249.   ' setup job priorities
  1250.   cboPriority.AddItem "10"
  1251.   cboPriority.AddItem "20"
  1252.   cboPriority.AddItem "30"
  1253.   cboPriority.AddItem "40"
  1254.   cboPriority.AddItem "50"
  1255.   cboPriority.AddItem "60"
  1256.   ' setup job priorities
  1257.   cboObjectRelease.AddItem "*CURRENT"
  1258.   cboObjectRelease.AddItem "*PRV"
  1259.   cboObjectRelease.AddItem "V2R3M0"
  1260.   cboObjectRelease.AddItem "V3R0M5"
  1261.   cboObjectRelease.AddItem "V3R1M0"
  1262.   cboObjectRelease.AddItem "V3R1M1"
  1263.   ' get program defaults
  1264.   Call AppDefaults(bGet)
  1265.   ' turn on timer
  1266.   tmrDisplay.Enabled = True
  1267. End Sub
  1268. Sub Form_Unload (Cancel As Integer)
  1269.   ' save current settings as defaults
  1270.   Call AppDefaults(bSAVE)
  1271.   ' end program
  1272.   End
  1273. End Sub
  1274. Function GetSaveLibrary (sLibrary$) As Integer
  1275.  ' Description:
  1276.  '  Returns the library that the object(s)
  1277.  '  was originally saved from. This is
  1278.  '  necessary for the RSTOBJ command.
  1279.  ' Parameters:
  1280.  '  sLibrary             library name returned
  1281.  ' Variables:
  1282.   Dim nFileNum           As Integer  ' file number
  1283.   Dim sFile              As String   ' file name
  1284.   ' open PC file to be uploaded
  1285.   sFile = Trim$(txtPCFileDirectory.Text)
  1286.   If Right$(sFile, 1) <> "\" Then sFile = sFile & "\"
  1287.   sFile = sFile & Trim$(txtPCFileName.Text)
  1288.   nFileNum = FreeFile
  1289.   Open sFile For Binary As nFileNum
  1290.   ' fill with blanks
  1291.   sLibrary = Space$(12)
  1292.   ' get the string containing library name
  1293.   Get #nFileNum, 1315, sLibrary
  1294.   ' convert to ascii
  1295.   sLibrary = Trim$(zzCV_EBCDICToASCII(Me.hWnd, sLibrary))
  1296.   ' close the file
  1297.   Close nFileNum
  1298.   ' return true or false to caller
  1299.   GetSaveLibrary = sLibrary <> gsEMPTY
  1300. End Function
  1301. Sub Gobble (c As Control, KeyASCII As Integer)
  1302.   ' gobble up ENTER and make caps
  1303.   If KeyASCII = KEY_RETURN Then
  1304.     KeyASCII = 0
  1305.     SendKeys "{TAB}"
  1306.   Else
  1307.     KeyASCII = Asc(UCase$(Chr$(KeyASCII)))
  1308.   End If
  1309. End Sub
  1310. Function ObjectDownload () As Integer
  1311.  ' Description:
  1312.  '  Download data file which contains actual
  1313.  '  save file data to the local PC file
  1314.  ' Variables:
  1315.   Dim lConvID            As Long     ' conversation id
  1316.   Dim lProcCallBack      As Long     ' call back address
  1317.   Dim nAPIRC             As Integer  ' return code
  1318.   Dim nFileNum           As Integer  ' file number
  1319.   Dim nNumTemplates      As Integer  ' number of fields
  1320.   Dim sBuffer            As String   ' transfer buffer
  1321.   Dim sDataReturned      As String   ' data returned
  1322.   Dim sFile              As String   ' file name
  1323.   ' execute SELECT
  1324.   sBuffer = "SELECT * FROM " & Trim$(txtDataFileLibrary.Text) & "/" & Trim$(txtDataFileName.Text)
  1325.   nAPIRC = zzTFOpen(Me.hWnd, lProcCallBack, lConvID, sBuffer, cboSystems.Text, nNumTemplates)
  1326.   ' if select worked
  1327.   If nAPIRC = gnTF_OK Then
  1328.     ' setup the PC file name
  1329.     sFile = Trim$(txtPCFileDirectory)
  1330.     If Right$(sFile, 1) <> "\" Then sFile = sFile & "\"
  1331.     sFile = sFile & Trim$(txtPCFileName)
  1332.     ' delete and open PC file
  1333.     On Error Resume Next
  1334.     Kill sFile
  1335.     nFileNum = FreeFile
  1336.     Open sFile For Binary As #nFileNum
  1337.     ' retrieve records
  1338.     Do
  1339.       DoEvents
  1340.       nAPIRC = zzTFGetRecord(Me.hWnd, lProcCallBack, lConvID, cboSystems.Text, gnTF_NO_CONVERSION, sDataReturned)
  1341.       If nAPIRC <> gnTF_OK Then Exit Do
  1342.       Put #nFileNum, , sDataReturned
  1343.     Loop
  1344.     ' close file and conversation
  1345.     Close #nFileNum
  1346.     ObjectDownload = True
  1347.   Else
  1348.     MsgBox "File transfer download error 'x'" & Hex$(nAPIRC) & " encountered.", MB_ICONSTOP
  1349.     ObjectDownload = False
  1350.   End If
  1351.   ' close active transfer requests
  1352.   nAPIRC = zzTFEndConversation(Me.hWnd, lProcCallBack, lConvID, cboSystems.Text)
  1353. End Function
  1354. Sub ObjectTypes ()
  1355.  ' Description
  1356.  '  Loads the object type Combo with valid AS400 object types.
  1357.  ' Variables:
  1358.   Dim c As Control
  1359.   ' use a abbreviated name as a pointer to the cboObjectType Object
  1360.   Set c = cboObjectType
  1361.   ' clear the combo box contents
  1362.   c.Clear
  1363.   ' add the combo box items
  1364.   c.AddItem "*ALL"
  1365.   c.AddItem "*ALRTBL"
  1366.   c.AddItem "*AUTL"
  1367.   c.AddItem "*BNDDIR"
  1368.   c.AddItem "*CFGL"
  1369.   c.AddItem "*CHTFMT"
  1370.   c.AddItem "*CLD"
  1371.   c.AddItem "*CLS"
  1372.   c.AddItem "*CMD"
  1373.   c.AddItem "*CNNL"
  1374.   c.AddItem "*COSD"
  1375.   c.AddItem "*CSI"
  1376.   c.AddItem "*CSPMAP"
  1377.   c.AddItem "*CSPTBL"
  1378.   c.AddItem "*CTLD"
  1379.   c.AddItem "*DEVD"
  1380.   c.AddItem "*DOC"
  1381.   c.AddItem "*DTAARA"
  1382.   c.AddItem "*DTADCT"
  1383.   c.AddItem "*DTAQ"
  1384.   c.AddItem "*EDTD"
  1385.   c.AddItem "*FCT"
  1386.   c.AddItem "*FILE"
  1387.   c.AddItem "*FLR"
  1388.   c.AddItem "*FNTRSC"
  1389.   c.AddItem "*FORMDF"
  1390.   c.AddItem "*FTR"
  1391.   c.AddItem "*GSS"
  1392.   c.AddItem "*JOBD"
  1393.   c.AddItem "*JOBQ"
  1394.   c.AddItem "*JOBSCD"
  1395.   c.AddItem "*JRN"
  1396.   c.AddItem "*JRNRCV"
  1397.   c.AddItem "*LIB"
  1398.   c.AddItem "*LIND"
  1399.   c.AddItem "*MENU"
  1400.   c.AddItem "*MODD"
  1401.   c.AddItem "*MODULE"
  1402.   c.AddItem "*MSGF"
  1403.   c.AddItem "*MSGQ"
  1404.   c.AddItem "*NODL"
  1405.   c.AddItem "*NWID"
  1406.   c.AddItem "*OUTQ"
  1407.   c.AddItem "*OVL"
  1408.   c.AddItem "*PAGDFN"
  1409.   c.AddItem "*PAGSEG"
  1410.   c.AddItem "*PDG"
  1411.   c.AddItem "*PGM"
  1412.   c.AddItem "*PNLGRP"
  1413.   c.AddItem "*PRDVAL"
  1414.   c.AddItem "*PRDDFN"
  1415.   c.AddItem "*PRDLOD"
  1416.   c.AddItem "*QMFORM"
  1417.   c.AddItem "*QMQRY"
  1418.   c.AddItem "*QRYDFN"
  1419.   c.AddItem "*RCT"
  1420.   c.AddItem "*SBSD"
  1421.   c.AddItem "*SCHIDX"
  1422.   c.AddItem "*SPADCT"
  1423.   c.AddItem "*SQLPKG"
  1424.   c.AddItem "*SRVPGM"
  1425.   c.AddItem "*SSND"
  1426.   c.AddItem "*S36"
  1427.   c.AddItem "*TBL"
  1428.   c.AddItem "*USRIDX"
  1429.   c.AddItem "*USRPRF"
  1430.   c.AddItem "*USRQ"
  1431.   c.AddItem "*USRSPC"
  1432.   c.AddItem "*WSCCST"
  1433. End Sub
  1434. Function ObjectUpload () As Integer
  1435.  ' Description:
  1436.  '  Upload PC file which contains save file
  1437.  '  data to the AS/400 data file which will
  1438.  '  be copied to the save file.
  1439.  ' Variables:
  1440.   Dim lConvID            As Long     ' conversation id
  1441.   Dim lProcCallBack      As Long     ' call back address
  1442.   Dim lI                 As Long     ' working index
  1443.   Dim lLOF               As Long     ' length of file
  1444.   Dim lRecords           As Long     ' number of records to process
  1445.   Dim nAPIRC             As Integer  ' return code
  1446.   Dim nFileNum           As Integer  ' file number
  1447.   Dim nNumTemplates      As Integer  ' number of fields
  1448.   Dim sBuffer            As String   ' transfer buffer
  1449.   Dim sFile              As String   ' file name
  1450.   Dim sRecord            As String   ' data returned
  1451.   ' execute REPLACE
  1452.   sBuffer = "REPLACE * INTO " + Trim$(txtDataFileLibrary.Text) & "/" & Trim$(txtDataFileName.Text)
  1453.   nAPIRC = zzTFOpen(Me.hWnd, lProcCallBack, lConvID, sBuffer, cboSystems.Text, nNumTemplates)
  1454.   ' no transfer error
  1455.   If nAPIRC = gnTF_OK Then
  1456.     ' open PC file to be uploaded
  1457.     sFile = Trim$(txtPCFileDirectory.Text)
  1458.     If Right$(sFile, 1) <> "\" Then sFile = sFile & "\"
  1459.     sFile = sFile & Trim$(txtPCFileName.Text)
  1460.     nFileNum = FreeFile
  1461.     Open sFile For Binary As nFileNum
  1462.     ' get count of records
  1463.     lLOF = LOF(nFileNum)
  1464.     lRecords = lLOF / nSAVEFILE_RECORD_SIZE
  1465.     ' write each record to AS/400
  1466.     For lI = 1 To lRecords
  1467.       sRecord = Space$(nSAVEFILE_RECORD_SIZE)
  1468.       Get #nFileNum, , sRecord
  1469.       DoEvents
  1470.       nAPIRC = zzTFSendRecord(Me.hWnd, lProcCallBack, lConvID, cboSystems.Text, gnTF_NO_CONVERSION, sRecord, nSAVEFILE_RECORD_SIZE)
  1471.       If nAPIRC = gnTF_XFER_REQ_NOT_OPENED Then Exit For
  1472.       If nAPIRC = gnTF_EOF Then Exit For
  1473.     Next lI
  1474.     ' close the output file
  1475.     Close nFileNum
  1476.     ObjectUpload = True
  1477.   ' error
  1478.   Else
  1479.     MsgBox "File transfer upload error 'x'" & Hex$(nAPIRC) & " encountered.", MB_ICONSTOP
  1480.     ObjectUpload = False
  1481.   End If
  1482.   ' close file
  1483.   nAPIRC = zzTFClose(Me.hWnd, lProcCallBack, lConvID, cboSystems.Text)
  1484.   ' close active transfer requests
  1485.   nAPIRC = zzTFEndConversation(Me.hWnd, lProcCallBack, lConvID, cboSystems.Text)
  1486. End Function
  1487. Sub optServerMethod_KeyPress (Index As Integer, KeyASCII As Integer)
  1488.   ' gobble enter key and convert entry to uppercase
  1489.   Call Gobble(optServerMethod(Index), KeyASCII)
  1490. End Sub
  1491. Function RunCmd (ByVal sIgnoreMsg1$, ByVal sIgnoreMsg2$) As Integer
  1492.  ' Description:
  1493.  '  Execute command passed
  1494.  ' Parameters:
  1495.  '  sIgnoreMsg1         1st message to ignore
  1496.  '  sIgnoreMsg2         2nd message to ignore
  1497.  ' Variables:
  1498.   Dim lProcCallBack     As Long     ' call back address
  1499.   Dim nAPIRC            As Integer  ' API return code
  1500.   Dim nZ                As Integer  ' work index
  1501.   ' assume command worked
  1502.   RunCmd = True
  1503.   ' submit command
  1504.   nAPIRC = zzSRCmdAndFormatMsgsWithCB(Me.hWnd, cboSystems.Text, sCmd, sMsgs, lProcCallBack)
  1505.   ' if no severe error
  1506.   If nAPIRC <= gnSR_ERROR Then
  1507.     ' if messages returned
  1508.     If Len(sMsgs) > 0 Then
  1509.       ' don't ignore 1st message
  1510.       If sIgnoreMsg1 = gsEMPTY Then
  1511.         ' show messages
  1512.         MsgBox sMsgs, MB_ICONSTOP
  1513.         RunCmd = False
  1514.       ' ignore 1st message
  1515.       Else
  1516.         
  1517.         ' if 1st message not found
  1518.         nZ = InStr(1, sMsgs, sIgnoreMsg1)
  1519.         If nZ = 0 Then
  1520.           ' don't ignore 2nd message
  1521.           If sIgnoreMsg2 = gsEMPTY Then
  1522.             MsgBox sMsgs, MB_ICONSTOP
  1523.             RunCmd = False
  1524.           ' if 2nd message not found then
  1525.           ' show messages that were returned
  1526.           Else
  1527.             If InStr(1, sMsgs, sIgnoreMsg2) = 0 Then
  1528.               MsgBox sMsgs, MB_ICONSTOP
  1529.               RunCmd = False
  1530.             End If
  1531.           
  1532.           End If
  1533.         End If
  1534.       End If
  1535.     End If
  1536.   ' if severe error show it
  1537.   ' command did not work
  1538.   Else
  1539.     MsgBox "Remote command error 'x'" & Hex$(nAPIRC) & " encountered.", MB_ICONSTOP
  1540.     RunCmd = False
  1541.   End If
  1542.   ' give up timeslice
  1543.   DoEvents
  1544. End Function
  1545. Sub SaveSets (ByVal bGet%)
  1546.  ' Description:
  1547.  '  Get or save save sets
  1548.  ' Parameters:
  1549.  '  bGet           get defaults from file
  1550.  ' Constants:
  1551.   Const sSECTION6 = "SAVESETS"
  1552.  ' Variables:
  1553.   Dim n1  As Integer
  1554.   Dim s1  As String
  1555.   ' if getting defaults
  1556.   If bGet Then
  1557.     ' setup save sets section
  1558.     nRC = zzINISetSection(sSECTION6)
  1559.     ' clear any existing entries
  1560.     cboSets.Clear
  1561.     ' up to 100 entries possible
  1562.     For n1 = 0 To 99
  1563.       ' get next entry
  1564.       nRC = zzINIGetString(Right$("0" & Format$(n1), 2), s1)
  1565.       ' if something returned add to combo box
  1566.       If s1 <> gsEMPTY Then cboSets.AddItem s1
  1567.       
  1568.     Next n1
  1569.     ' move to first entry
  1570.     If cboSets.ListCount > 0 Then
  1571.       cboSets.ListIndex = 0
  1572.     End If
  1573.   ' if saving sets
  1574.   Else
  1575.     ' delete all entries in existing section
  1576.     nRC = zzINIDelSection(sSECTION6)
  1577.     ' setup save sets section
  1578.     nRC = zzINISetSection(sSECTION6)
  1579.     ' up to 99 entries possible
  1580.     For n1 = 0 To cboSets.ListCount - 1
  1581.       ' get entry from combo box
  1582.       s1 = cboSets.List(n1)
  1583.       ' put next entry into INI file
  1584.       nRC = zzINIPutString(Right$("0" & Format$(n1), 2), s1)
  1585.     Next n1
  1586.   End If
  1587. End Sub
  1588. Sub tmrDisplay_Timer ()
  1589.   ' show time
  1590.   lblTime = Format$(Time$, "h:mm:ss AM/PM")
  1591. End Sub
  1592. Sub txtDataFileLibrary_KeyPress (KeyASCII As Integer)
  1593.   ' gobble enter key and convert entry to uppercase
  1594.   Call Gobble(txtDataFileLibrary, KeyASCII)
  1595. End Sub
  1596. Sub txtDataFileName_KeyPress (KeyASCII As Integer)
  1597.   ' gobble enter key and convert entry to uppercase
  1598.   Call Gobble(txtDataFileName, KeyASCII)
  1599. End Sub
  1600. Sub txtObjectLibrary_KeyPress (KeyASCII As Integer)
  1601.   ' gobble enter key and convert entry to uppercase
  1602.   Call Gobble(txtObjectLibrary, KeyASCII)
  1603. End Sub
  1604. Sub txtObjectName_KeyPress (KeyASCII As Integer)
  1605.   ' gobble enter key and convert entry to uppercase
  1606.   Call Gobble(txtObjectName, KeyASCII)
  1607. End Sub
  1608. Sub txtPCFileDirectory_KeyPress (KeyASCII As Integer)
  1609.   ' gobble enter key and convert entry to uppercase
  1610.   Call Gobble(txtPCFileDirectory, KeyASCII)
  1611. End Sub
  1612. Sub txtPCFileName_KeyPress (KeyASCII As Integer)
  1613.   ' gobble enter key and convert entry to uppercase
  1614.   Call Gobble(txtPCFileName, KeyASCII)
  1615. End Sub
  1616. Sub txtRestoreLibrary_KeyPress (KeyASCII As Integer)
  1617.   ' gobble enter key and convert entry to uppercase
  1618.   Call Gobble(txtRestoreLibrary, KeyASCII)
  1619. End Sub
  1620. Sub txtSaveFileLibrary_KeyPress (KeyASCII As Integer)
  1621.   ' gobble enter key and convert entry to uppercase
  1622.   Call Gobble(txtSaveFileLibrary, KeyASCII)
  1623. End Sub
  1624. Sub txtSaveFileName_KeyPress (KeyASCII As Integer)
  1625.   ' gobble enter key and convert entry to uppercase
  1626.   Call Gobble(txtSaveFileName, KeyASCII)
  1627. End Sub
  1628. Sub txtServerLibrary_KeyPress (KeyASCII As Integer)
  1629.   ' gobble enter key and convert entry to uppercase
  1630.   Call Gobble(txtServerLibrary, KeyASCII)
  1631. End Sub
  1632.